/**
 * 
 */
package dms.repository;

import java.util.Date;
import java.util.List;

import dms.model.Building;
import dms.model.Campus;
import dms.model.form.FoundNotice;
import dms.model.form.LostNotice;
import dms.model.form.Notice;
import dms.model.util.PageIterator;

/**
 * @author 李健
 *
 */
public interface NoticeRepository {
	
	public Notice findNoticeById(Long id);
	/**
	 * 
	 * @param start
	 * @param count
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findAllLostNotice(int start, int count, String query, Date fromDate, Date toDate, Boolean applied);
	
	/**
	 * 
	 * @param start
	 * @param coutn
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findAllFoundNotice(int start, int count, String query, Date fromDate, Date toDate, Boolean applied);
	
	/**
	 * 
	 * @param start
	 * @param count
	 * @param campus
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findLostNoticeByCampus(int start, int count, Campus campus, Date fromDate, Date toDate, Boolean applied);
	
	/**
	 * 
	 * @param start
	 * @param count
	 * @param campus
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findFoundNoticeByCampus(int start, int count, Campus campus, Date fromDate, Date toDate, Boolean applied);

	/**
	 * 
	 * @param start
	 * @param count
	 * @param building
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findLostNoticeByBuilding(int start, int count, Building building, Date fromDate, Date toDate, Boolean applied);
	
	/**
	 * 
	 * @param start
	 * @param count
	 * @param building
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findFoundNoticeByBuilding(int start, int count, Building building, Date fromDate, Date toDate, Boolean applied);

	/**
	 * 
	 * @param start
	 * @param count
	 * @param campus
	 * @param query 启示的描述或者相关人物的姓名
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findLostNoticeByCampusAndQuery(int start, int count, Campus campus, String query, Date fromDate, Date toDate, Boolean applied);
	
	/**
	 * 
	 * @param start
	 * @param count
	 * @param campus
	 * @param query 启示的描述或者相关人物的姓名
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findFoundNoticeByCampusAndQuery(int start, int count, Campus campus, String query, Date fromDate, Date toDate, Boolean applied);

	/**
	 * 
	 * @param start
	 * @param count
	 * @param building
	 * @param query 启示的描述或者相关人物的姓名
	 * @param fromDate 
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findLostNoticeByBuildingAndQuery(int start, int count, Building building, String query, Date fromDate, Date toDate, Boolean applied);

	/**
	 * 
	 * @param start
	 * @param count
	 * @param building
	 * @param query 启示的描述或者相关人物的姓名
	 * @param fromDate
	 * @param toDate
	 * @param applied 是否已找到，true表示已找到,false or null表示未找到
	 * @return
	 */
	PageIterator<Notice> findFoundNoticeByBuildingAndQuery(int start, int count, Building building, String query, Date fromDate, Date toDate, Boolean applied);

	Notice createNotice(Notice notice) throws Exception;
	
	Notice updateNotice(Notice notice) throws Exception;
	
	void deleteNoticeById(Long id) throws Exception;
	
	void deleteNotices(List<Long> ids) throws Exception;
	
	void deleteNotices(Long [] ids) throws Exception;
}





